<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="ISO-8859-1"%>
	
<%@taglib prefix="t" uri="http://java.sun.com/jsp/jstl/core" %>
<t:if test="${sessionScope['tipo']!=2}">
   <% response.sendRedirect("Inicio.jsp");%>
</t:if>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Fulbito Facil</title>
<script src="js/Validaciones.js"></script>
<link href="estilo.css" rel="stylesheet" />
<script src="js/script0.js"></script>

<%@page import="fulbitofacil.negocio.DistritoNegocio,java.util.*"%>
<%@page import="fulbitofacil.modelo.Distrito"%>

</head>
<body>

	<%@include file="header.jsp"%>

	<div class="art-post-inner art-article">
		<h1 class="art-postheader">FULBITO FACIL</h1>
		<div class="art-postcontent">


			<form name="frmLocal" action="LocalServlet" class="form-horizontal"
				method="post" onsubmit="return ValidarLocal();">
				<fieldset>
					<legend>Registrar Local</legend>
					<div class="campos">
						<label for="input01">Nombre</label>
						<div>
							<input type="text" id="input01" name="txtNombre"
								value="${Nombre}" required autofocus>
						</div>
					</div>

					<div class="campos">
						<label for="input02">Descripcion</label>
						<div>
							<textarea id="input02" name=txtDescripcion value="${Descripcion}" required></textarea>
						</div>
					</div>

					<div class="campos">
						<label class="control-label" for="input03">Direccion</label>
						<div class="controls">
							<input class="largo" type="text" id="input03" name="txtDireccion"
								value="${Direccion}" required>
						</div>
					</div>
					<div class="campos">
						<label for="input04">Direccion Google</label>
						<div>
							<input class="largo" type="text" id="input04"
								name="txtDireccionGoogle" value="${DireccionGoogle}" required>
						</div>
					</div>
					<div class="campos">
						<label for="input05">Telefono</label>
						<div>
							<input class="medio" type="text" id="input05" name="txtTelefono"
								value="${Telefono}" required>
						</div>
					</div>
					<div class="campos">
						<label for="input06">Distrito</label>
						<div>
							<select name="txtDistrito">
								<%
									DistritoNegocio cboDistrito = new DistritoNegocio();
									ArrayList distrito = (ArrayList) cboDistrito.ListarTodos();
									for (int i = 0; i < distrito.size(); i++) {
										Distrito txtDistrito = (Distrito) distrito.get(i);
								%>
								<option value="<%=txtDistrito.getIdDistrito()%>" selected>
									<%=txtDistrito.getNombre()%></option>
								<%
									}
								%>
							</select>
						</div>
					</div>
					<%%>
					
					<div class="botones">
						<input type="submit" value="Guardar"><input type="reset"
							value="Cancelar">
					</div>
					<div><H2>${msg}</H2></div>

				</fieldset>
			</form>

		</div>
		<div class="cleared"></div>
	</div>

	<%@include file="footer.jsp"%>


</body>
</html>